package org.jeecg.modules.hc.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.modules.hc.enums.HcAfterSalesStateEnum;
import org.jeecg.modules.hc.enums.HcIsFlagEnum;
import org.jeecg.modules.hc.enums.HcOrderStateEnum;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 商家订单
 * @Author: jeecg-boot
 * @Date: 2022-12-20
 * @Version: V1.0
 */
@Data
@TableName("hc_order_merchant")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "hc_order_merchant对象", description = "商家订单")
public class HcOrderMerchant implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableField(exist = false)
    @ApiModelProperty(value = "站点id")
    private String siteId;

    @TableField(exist = false)
    @ApiModelProperty(value = "取餐点图片")
    private String supplyAddressImg;

    @TableField(exist = false)
    @ApiModelProperty(value = "商户ID集合")
    private List<String> ids;

    @TableField(exist = false)
    @ApiModelProperty(value = "导出开始时间")
    private String timeBegin;

    @TableField(exist = false)
    @ApiModelProperty(value = "勾选的id")
    private String selections;

    @TableField(exist = false)
    @ApiModelProperty(value = "导出结束时间")
    private String timeEnd;

    @TableField(exist = false)
    @ApiModelProperty(value = "付款时间字符串")
    private String payTimeStr;

    @TableField(exist = false)
    @ApiModelProperty(value = "售后状态")
    private HcAfterSalesStateEnum afterSalesState;

    @TableField(exist = false)
    @ApiModelProperty(value = "菜品明细")
    private List<HcOrderDetailed> hcOrderDetailedList;

    @TableField(exist = false)
    private String createTimeStr;

    /**
     * id
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "id")
    private java.lang.String id;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private java.lang.String createBy;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private java.lang.String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @ApiModelProperty(value = "更新日期")
    private java.util.Date updateTime;
    /**
     * 用户ID
     */
    @ApiModelProperty(value = "用户ID")
    private java.lang.String userId;
    /**
     * 订单ID
     */
    @ApiModelProperty(value = "订单ID")
    private java.lang.String orderId;
    /**
     * 商户ID
     */
    @ApiModelProperty(value = "商户ID")
    private java.lang.String merchantId;
    /**
     * 门店描述
     */
    @ApiModelProperty(value = "门店描述")
    private java.lang.String storeDescription;
    /**
     * 门店LOGO
     */
    @ApiModelProperty(value = "门店LOGO")
    private java.lang.String logo;
    /**
     * 取餐地址
     */
    @ApiModelProperty(value = "取餐地址")
    private java.lang.String pickingAddress;
    /**
     * 地址ID
     */
    @ApiModelProperty(value = "地址ID")
    private java.lang.String addressId;
    /**
     * 售后ID
     */
    @ApiModelProperty(value = "售后ID")
    private java.lang.String afterSalesId;
    /**
     * 是否导出
     */
    @ApiModelProperty(value = "是否导出")
    private java.lang.Integer exportFlag;

    /**
     * 取餐序号
     */
    @Excel(name = "序号", width = 15)
    @ApiModelProperty(value = "取餐序号")
    private java.lang.Integer pickingSerialNo;

    /**
     * 地址代号
     */
    @Excel(name = "地址", width = 15)
    @ApiModelProperty(value = "地址代号")
    private java.lang.String supplyAddress;

    /**
     * 取餐姓名
     */
    @Excel(name = "姓名", width = 15)
    @ApiModelProperty(value = "取餐姓名")
    private java.lang.String nameTakingMeal;

    /**
     * 取餐手机号
     */
    @Excel(name = "手机", width = 15)
    @ApiModelProperty(value = "取餐手机号")
    private java.lang.String phoneTakingMeals;

    /**
     * 门店名称
     */
    @Excel(name = "门店名称", width = 15)
    @ApiModelProperty(value = "门店名称")
    private java.lang.String storeName;

    @Excel(name = "菜品名称", width = 15)
    @TableField(exist = false)
    @ApiModelProperty(value = "菜品名称")
    private java.lang.String nameDishes;

    /**
     * 备注
     */
    @Excel(name = "备注", width = 15)
    @ApiModelProperty(value = "备注")
    private java.lang.String remarks;

    /**
     * 商品总价格
     */
    @Excel(name = "合作单价", width = 15)
    @ApiModelProperty(value = "商品总价格")
    private java.math.BigDecimal commodityPrice;

    /**
     * 总价格
     */
    @Excel(name = "消费金额", width = 15)
    @ApiModelProperty(value = "消费金额")
    private java.math.BigDecimal totalPrice;

    /**
     * 总佣金
     */
    @Excel(name = "抽佣金额", width = 15)
    @ApiModelProperty(value = "总佣金")
    private java.math.BigDecimal commission;

    /**
     * 创建日期
     */
    @Excel(name = "付款时间", width = 15, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private java.util.Date createTime;

    @Excel(name = "下单累计次数", width = 15)
    @TableField(exist = false)
    @ApiModelProperty(value = "下单累计次数")
    private Long orderCount;

    /**
     * 状态
     */

    @ApiModelProperty(value = "状态")
    private HcOrderStateEnum state;

    @TableField(exist = false)
    @Excel(name = "状态", width = 15)
    private String stateName;

    public String getStateName() {
        return state == null ? "" : state.getName();
    }

    @TableField(exist = false)
    @Excel(name = "公司名称")
    private String companyName;

    /**
     * 退款ID
     */
//    @Excel(name = "退款ID", width = 15)
    @ApiModelProperty(value = "退款ID")
    private java.lang.String refundId;

    /**
     * 退款钱包ID
     */
//    @Excel(name = "退款钱包ID", width = 15)
    @ApiModelProperty(value = "退款钱包ID")
    private java.lang.String refundWalletId;

    @ApiModelProperty(value = "是否是导入的数据")
    private HcIsFlagEnum importFlag;
}
